<?php

namespace App\Console\Commands;

use App\Models\Entity\Asset\Video\Vasseti;
use App\Classes\Injection\AssetiInjection;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use FTP;
use Storage;

class VassetiInjectionCallBackCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'vasseti:injectionCallBack';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '媒资注入结果反馈';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        Log::info("媒资注入同步任务开始".date("Y-m-d H:i:s"));

        //判断注入地区,目前只有黑龙江采用该方式
        $media_injection_place = config('custom.base.media_injection.place');
        switch ($media_injection_place) {

            case 'heilongjiang':
                 $msg = AssetiInjection::updateHeilongjiangDataToAsset();
                break;
            case 'guizhou':
                return '任务结束,贵州采用异步通知方式';
                break;
        }

        Log::info("媒资注入同步任务结束".date("Y-m-d H:i:s"));

    }
}
